package com.theyeasy.dvmini.config;

import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import tk.mybatis.spring.mapper.MapperScannerConfigurer;

/**
 * Create by zhangtai on 17/9/26
 */
@Configuration
public class MapperConfigurer {

    @Bean
    public MapperScannerConfigurer mapperScannerConfigurer(){
        MapperScannerConfigurer configurer = new MapperScannerConfigurer();
        configurer.setSqlSessionFactoryBeanName(SqlSessionFactoryBean.class.getName());
        configurer.setBasePackage("com.theyeasy.w1hd.dataobject");
        return configurer;
    }
}
